<template>
  <div>
    <hr />
    <h1>子组件</h1>
    <h1>{{ title }}</h1>
    <button @click="send">改变父组件的title</button>
  </div>
</template>
<script>
export default {
  props: ['title'],
  setup (props, context) {
    let send = () => {
      // update 固定的
      context.emit('update:title', '星期二')
    }
    return {
      send
    }
  }
}
</script>
<style lang="less"></style>
